﻿<UserControl x:Class="CustomerBrowser.Customer.EditCustomerView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" Focusable="False"
             d:DesignHeight="200">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" MinHeight="50"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" MinWidth="250" />
        </Grid.ColumnDefinitions>
        <Label Grid.Row="0" Grid.Column="0" Content="First Name" />
        <TextBox Grid.Row="0" Grid.Column="1" Text="{VBinding Path=FirstName}" />

        <Label Grid.Row="1" Grid.Column="0" Content="Last Name" />
        <TextBox Grid.Row="1" Grid.Column="1" Text="{VBinding Path=LastName}" />

        <ItemsControl Grid.Row="2" Grid.ColumnSpan="2" ItemsSource="{Binding Path=Commands}" VerticalAlignment="Bottom" HorizontalAlignment="Right" Focusable="False">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Button Content="{Binding Path=Text}" Command="{CBinding Path=Command}" Margin="5,0,0,0" MinWidth="80"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</UserControl>
